package org.mianshi.likou.top150;

public class 轮转数组189 {
    class Solution {
        public void rotate(int[] nums, int k) {
            int n = k;
            while (n>0){
                for (int i = 0; i < k; i++) {
                    int begin = nums.length-1-n;
                    int value = nums[begin];
                    nums[i]=value;
                    nums[begin]=value;
                    n--;
                }
            }
        }
    }


}
